xen/domctl: Drop vcpu_alloc_lock
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 27 Feb 2018 17:22:40 +0000 (17:22 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 6 Sep 2018 15:35:59 +0000 (16:35 +0100)
commit340ac8a94ab307a7d5d7a894c36d3393e66382eb
tree2ef68a7c235d641ffb8d64d104d3e9abd231dc02
parentc1bace00de265bf34bdf6119d99888bbb57a4ef4
xen/domctl: Drop vcpu_alloc_lock

Since its introduction in c/s 8cbb5278e "x86/AMD: Add support for AMD's OSVW
feature in guests", the OSVW data has been corrected to be per-domain rather
than per-vcpu, and is initialised during XEN_DOMCTL_createdomain.

Furthermore, because XENPF_microcode_update uses hypercall continuations to
move between CPUs, it drops the vcpu_alloc_lock mid update, meaning that it
didn't provided the interlock guarantee that the OSVW patch was looking for in
the first place.

This interlock serves no purpose, so take the opportunity to drop it and
remove a global spinlock from the hypervisor.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/platform_hypercall.c
xen/common/domctl.c
xen/include/xen/domain.h